package my.framework.ssm.sample.controller.rest;

import my.framework.ssm.sample.common.controller.Result;
import my.framework.ssm.sample.common.enums.NotifyEnum;
import my.framework.ssm.sample.service.NotifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 通知api
 *
 * @author NuKi
 * @date 2018/11/26 23:10
 */
@RestController
public class NotifyController {
    @Autowired
    private NotifyService notifyService;

    @RequestMapping("notifyAllUser")
    public Result notifyAllUser(String message) {
        notifyService.notifyMessage(message, NotifyEnum.ALL);
        return Result.suc();
    }
}
